
var DocsPollerPack = window.DocsPollerPack || {};

DocsPollerPack.PollControllerInterface = function()
{
	//Nothing here, this is just an interface
}
DocsPollerPack.PollControllerInterface.prototype.notify = function()
{
	alert("notify: Not implemented function");
}
DocsPollerPack.PollControllerInterface.prototype.getDocKey = function()
{
	alert("getDocKey: Not implemented function");
}
DocsPollerPack.PollControllerInterface.prototype.getData = function(docKey)
{
	alert("getData: Unimplemented, Key : " + docKey);
}
DocsPollerPack.Controller = function(viewCom, modelCom)
{
	this.docKey = null;
	this.suscriptor = null;
	this.view = viewCom;
	this.model = modelCom;
}
DocsPollerPack.Controller.prototype = clone(DocsPollerPack.PollControllerInterface.prototype);
DocsPollerPack.Controller.prototype.constructor = DocsPollerPack.Controller;
DocsPollerPack.Controller.prototype.notify = function()
{
	this.model.getCandidateTotal();
	//call the model, get that data
}
DocsPollerPack.Controller.prototype.notifyRegion= function()
{
	this.model.getRegionData();
	//call the model, get that data
}
//Gets the inserted key by the user in the web-page
DocsPollerPack.Controller.prototype.getDocKey = function()
{
	this.docKey = this.view.getDocKey();
}
DocsPollerPack.Controller.prototype.getData = function(docKey)
{
	this.model.getData(docKey);
}